using System;

using System.Xml;

using System.Data;
using Aulac.Global.Enums; using Aulac.Global.Data; using Aulac.Global.Common; using Aulac.Global.Xml;
using System.Windows.Forms;
using Aulac.Client.Connect.Ems;
using System.Collections.Generic;
using Aulac.Client.Data.Helper;
using Aulac.Verb.Ems;
using Aulac.Rsc.Bss;
using Aulac.Rsc.Bss.Tags;

namespace Aulac.Client.Data.Bss.Helper.DataItems
{
	/// <summary>
	/// Summary description for DataCommon.
	/// </summary>
    public class DataStoreHelper
	{
        public static void LoadStoreFromSrv(Control ctr, int isActive)
        {
            try
            {
                XmlDataDocument doc = DataRequest.CreateXmlDocument(AulacEmsVerb.Items.Store.GetListStoreMdn, AulacEmsVerb.Items.Noun.MdnItems.MdnItem);
                XmlProcess.AddValueParamItem(doc, tagGeneral.IsActive, isActive.ToString());
                DataHelper.GetDataFromServerToControl(ctr, doc);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static void LoadStoreFromSrv(Control ctr, List<StoreTypes> pListStoreTypes, bool isActive)
        {
            try
            {
                XmlDataDocument doc = DataRequest.CreateXmlDocument(AulacEmsVerb.Items.Store.GetListStoreMdn, AulacEmsVerb.Items.Noun.MdnItems.MdnItem);
                XmlProcess.AddValueParamItem(doc, tagGeneral.IsActive, isActive);
                
                DataHelper.GetDataFromServerToControl(ctr, doc);

             }
            catch (Exception ex)
            {
                throw ex;
            }
        }

	}
}
